package com.authine.cloudpivot.ext.enums;

import com.alibaba.fastjson.JSON;

import java.util.Objects;

public enum CustomerStatisticEnum {

    inquiry_good_num(0,"询价商品条数"),
    clarify_record_count(1,"澄清询价商品条数"),
    quote_count_num(2,"未报价询价商品条数"),
    invite_code_num(3,"原供应商参与询价商品条数"),
    order_goods(4,"订单商品条数"),
    platform_num(5,"原供应商订单商品条数"),
    old_platformNum(6,"平台供应商订单商品条数"),
    orderMoney(7,"订单金额"),
    oldVendorOrderMoney(8,"原供应商订单金额"),
    plateVendorOrderMoney(9,"平台供应商订单金额"),
    vendorScopeGoodNum(10,"询价单询价方式为邀请或者邀请且全平台公开询价商品条数"),
    picketagedGoodCount(11,"定标商品条数"),
    quotationCount(12,"报价次数"),
    averageQuotationCount(13,"平均报价次数");


    public String des;
    public Integer id;

    CustomerStatisticEnum(Integer id, String des) {
        this.des = des;
        this.id = id;
    }



    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public static CustomerStatisticEnum findDesById(Integer id) {
        if (Objects.isNull(id)) {
            return null;
        }
        for (CustomerStatisticEnum CustomerStatisticEnum : CustomerStatisticEnum.values()) {
            if (Objects.equals(CustomerStatisticEnum.getId(), id)) {
                return CustomerStatisticEnum;
            }
        }
        return null;
    }

}


